//
//  main.m
//  交换牌
//
//  Created by qianfeng on 15/8/9.
//  Copyright (c) 2015年 qianfeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XYPerson.h"
#import "XYhands.h"
#import "XYPoker.h"

enum colors{
    HONG_TAO,
    HEI_TAO,
    MEI_HUA,
    FANG_KUAI
};
enum numbers{
    A = 1,
    J = 11,
    Q,
    K
};


int main(int argc, const char * argv[]) {
    @autoreleasepool {
        
        XYPerson * xiaoming = [[XYPerson alloc] init];
        
        XYhands * lefthand = [[XYhands alloc] init];
        XYhands * righthand = [[XYhands alloc] init];
        
        XYPoker * poker1 = [[XYPoker alloc] init];
        XYPoker * poker2 = [[XYPoker alloc] init];
        
        [poker1 setColor:HONG_TAO andNumber:K];
        [poker2 setColor:HEI_TAO andNumber:A];
        
        [xiaoming setLefthand:lefthand andRighthand:righthand];
        
        [xiaoming getLefthandPoker:poker1 andRighthandPoker:poker2];
        
        NSLog(@"交换前");
        [xiaoming showPoker];
        
        [xiaoming exchangePoker];
        
        NSLog(@"交换后");
        [xiaoming showPoker];
        
       
        
        
    
    
    }
    return 0;
}
















